<?php

namespace app\common\model;

class ChatPrompt extends \think\Model
{
    protected $table = 'db_chat_prompt';

    protected $jsonAssoc = true;

    protected $autoWriteTimestamp = true;

    protected $schema = [
        'id' => 'int',
        'create_time' => 'int',
        'update_time' => 'int',
        'pubid' => 'varchar',
        'name' => 'varchar',
        'sort' => 'int',
        'title' => 'text',
        'chat_prompt_front' => 'text',
        'chat_prompt' => 'text',
        'chat_prompt_classification_id' => 'int',
        'number_of_uses' => 'int',
    ];

    public $getters = [
        
    ];

    /**
     * 关联模型chatPromptMember
     */
    public function chatPromptMember()
    {
        return $this->hasMany(ChatPromptMember::class );
    }

    /**
     * 关联模型chat
     */
    public function chat()
    {
        return $this->hasMany(Chat::class );
    }

    /**
     * 关联模型chatPromptClassification
     */
    public function chatPromptClassification()
    {
        return $this->belongsTo(ChatPromptClassification::class );
    }
}
